chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
	switch (request.code) {
		case 'getTask': // 获取任务
			sendResponse({result: getTask(request.uid)});
			break;
		case 'login':
			login(request.memedia_id, request.nickname, request.uuid);
			break;
		case 'getLoginStatus':
			sendResponse({result: login_status});
			break;
		case 'getNickname':
			sendResponse({result: nickname_temp});
			break;
		case 'upUUID':
			upUUID(request.uuid);
			break;
		case 'upCookies':
			upCookies(request.url);
			break;
		case 'closeTab':
			closeTab(request.url);
			break;
	}
});